#include <iostream>
#include "threadPool.hpp"
#include "PCModel.hpp"
void product(blockQueue<int>* q)
{
	int i = 1;
	while (true)
	{
		q->push(i++);
	}
}
void consume(blockQueue<int>* q)
{
	while (true)
	{
		q->pop();
		std::this_thread::sleep_for(std::chrono::seconds(1));
	}
}



int main()
{
	blockQueue<int> q;
	thread t1(consume, &q);
	thread t2(product, &q);

	t1.join();
	t2.join();
	return 0;
}

//using namespace std;
//int main()
//{
//	threadPool* tp = threadPool::GetInstance();
//	for (int i = 0; i < 5; i++)
//	{
//		Task t;
//		tp->push(t);
//	}
//	std::this_thread::sleep_for(std::chrono::seconds(3));
//
//	return 0;
//}





v